/*    */ package server.life;
/*    */ 
/*    */ import constants.GameConstants;
/*    */ 
/*    */ public class ChangeableStats
/*    */   extends OverrideMonsterStats {
/*    */   public final int watk;
/*    */   public final int matk;
/*    */   public final int acc;
/*    */   public final int eva;
/*    */   public final int PDRate;
/*    */   public final int MDRate;
/*    */   public final int pushed;
/*    */   public final int speed;
/*    */   public final int level;
/*    */   
/*    */   public ChangeableStats(MapleMonsterStats stats, OverrideMonsterStats ostats) {
/* 18 */     this.hp = ostats.getHp();
/* 19 */     this.exp = ostats.getExp();
/* 20 */     this.mp = ostats.getMp();
/* 21 */     this.watk = stats.getPhysicalAttack();
/* 22 */     this.matk = stats.getMagicAttack();
/* 23 */     this.acc = stats.getAcc();
/* 24 */     this.eva = stats.getEva();
/* 25 */     this.PDRate = stats.getPDRate();
/* 26 */     this.MDRate = stats.getMDRate();
/* 27 */     this.pushed = stats.getPushed();
/* 28 */     this.speed = stats.getSpeed();
/* 29 */     this.level = stats.getLevel();
/*    */   }
/*    */   
/*    */   public ChangeableStats(MapleMonsterStats stats, int newLevel, boolean pqMob) {
/* 33 */     double mod = Math.max(newLevel / stats.getLevel(), 1);
/*    */     
/* 35 */     double pqMod = pqMob ? 1.5D : 1.0D;
/* 36 */     this.hp = Math.round((!stats.isBoss() ? GameConstants.getMonsterHP(newLevel) : (stats.getHp() * mod)) * pqMod);
/* 37 */     this.exp = (int)Math.round(stats.getExp() * mod * pqMod * 0.8D);
/* 38 */     this.mp = (int)Math.round(stats.getMp() * mod * pqMod);
/* 39 */     this.watk = (int)Math.round(stats.getPhysicalAttack() * mod);
/* 40 */     this.matk = (int)Math.round(stats.getMagicAttack() * mod);
/* 41 */     this.acc = Math.round((stats.getAcc() + Math.max(0, newLevel - stats.getLevel()) * 2));
/* 42 */     this.eva = Math.round((stats.getEva() + Math.max(0, newLevel - stats.getLevel())));
/* 43 */     this.PDRate = Math.min(stats.isBoss() ? 30 : 20, (int)Math.round(stats.getPDRate() * mod));
/* 44 */     this.MDRate = Math.min(stats.isBoss() ? 30 : 20, (int)Math.round(stats.getMDRate() * mod));
/* 45 */     this.pushed = (int)Math.round(stats.getPushed() * mod);
/* 46 */     this.speed = (int)Math.round(stats.getSpeed() * mod);
/* 47 */     this.level = (newLevel > 275) ? 275 : newLevel;
/*    */   }
/*    */   
/*    */   public ChangeableStats(MapleMonsterStats stats, int newLevel, int multipler) {
/* 51 */     double base = (Math.max(newLevel / stats.getLevel(), 1) * multipler);
/* 52 */     this.hp = Math.round(stats.getHp() * base * (!stats.isBoss() ? 1.0D : 3.0D));
/* 53 */     this.mp = (int)Math.round(stats.getMp() * base);
/* 54 */     this.exp = (int)(stats.getExp() * base);
/* 55 */     this.watk = (int)Math.round(stats.getPhysicalAttack() * base);
/* 56 */     this.matk = (int)Math.round(stats.getMagicAttack() * base);
/* 57 */     this.acc = (int)Math.round(stats.getAcc() + Math.max(0, newLevel - stats.getLevel()) * base);
/* 58 */     this.eva = (int)Math.round(stats.getEva() + Math.max(0, newLevel - stats.getLevel()) * base);
/* 59 */     this.PDRate = Math.min(stats.isBoss() ? 30 : 20, (int)Math.round(stats.getPDRate() * base));
/* 60 */     this.MDRate = Math.min(stats.isBoss() ? 30 : 20, (int)Math.round(stats.getMDRate() * base));
/* 61 */     this.pushed = (int)Math.round(stats.getPushed() * base);
/* 62 */     this.speed = (int)Math.round(stats.getSpeed() * base);
/* 63 */     this.level = (newLevel > 275) ? 275 : newLevel;
/*    */   }
/*    */ }


/* Location:              C:\PGX\Server.jar!\server\life\ChangeableStats.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */